.class public Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;
.super Landroid/widget/BaseAdapter;
.source "MessageAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field private mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mContext:Landroid/content/Context;

.field private mDetailRequestCacheUtil:Lcom/brixd/niceapp/util/DetailRequestCacheUtil;

.field private mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mMessages:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/userinfo/model/MessageModel;",
            ">;"
        }
    .end annotation
.end field

.field private mUserModel:Lcom/brixd/niceapp/model/UserModel;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .registers 8
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/userinfo/model/MessageModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p2, "messages":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/userinfo/model/MessageModel;>;"
    const v4, 0x7f02010e

    const v3, 0x7f0200d8

    const/4 v2, 0x1

    .line 41
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 42
    iput-object p1, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mContext:Landroid/content/Context;

    .line 43
    iput-object p2, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mMessages:Ljava/util/List;

    .line 44
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    .line 45
    new-instance v0, Lcom/brixd/niceapp/util/DetailRequestCacheUtil;

    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/brixd/niceapp/util/DetailRequestCacheUtil;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mDetailRequestCacheUtil:Lcom/brixd/niceapp/util/DetailRequestCacheUtil;

    .line 47
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 48
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    .line 49
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 50
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 51
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    new-instance v1, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    .line 52
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 53
    invoke-virtual {v0, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 54
    invoke-virtual {v0, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 55
    invoke-virtual {v0, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 57
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cloneFrom(Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 58
    invoke-virtual {v0, v4}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 59
    invoke-virtual {v0, v4}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 60
    invoke-virtual {v0, v4}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 61
    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;

    .prologue
    .line 30
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;)Lcom/brixd/niceapp/util/DetailRequestCacheUtil;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;

    .prologue
    .line 30
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mDetailRequestCacheUtil:Lcom/brixd/niceapp/util/DetailRequestCacheUtil;

    return-object v0
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 69
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mMessages:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 74
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mMessages:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 79
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 12
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    const/4 v7, 0x0

    .line 85
    if-nez p2, :cond_10d

    .line 86
    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mContext:Landroid/content/Context;

    const v4, 0x7f030062

    invoke-static {v3, v4, v7}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 88
    new-instance v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;-><init>(Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;)V

    .line 89
    .local v1, "holder":Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;
    const v3, 0x7f0a00bb

    invoke-virtual {p2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    iput-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    .line 90
    const v3, 0x7f0a002f

    invoke-virtual {p2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    iput-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->appIcon:Landroid/widget/ImageView;

    .line 91
    const v3, 0x7f0a0099

    invoke-virtual {p2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    .line 92
    const v3, 0x7f0a0147

    invoke-virtual {p2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->time:Landroid/widget/TextView;

    .line 93
    const v3, 0x7f0a00e8

    invoke-virtual {p2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->content:Landroid/widget/TextView;

    .line 95
    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 100
    :goto_4b
    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mMessages:Ljava/util/List;

    invoke-interface {v3, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/brixd/niceapp/userinfo/model/MessageModel;

    .line 101
    .local v2, "message":Lcom/brixd/niceapp/userinfo/model/MessageModel;
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->time:Landroid/widget/TextView;

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getTime()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/brixd/niceapp/util/DateUtils;->convertServerTimeToLocal(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 103
    const-string v3, "community_up"

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getType()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_131

    .line 104
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    const-string v4, "#f18059"

    invoke-static {v4}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V

    .line 105
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getContent()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 107
    const-string v0, ""

    .line 108
    .local v0, "content":Ljava/lang/String;
    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getUpUsers()Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    const/4 v4, 0x1

    if-le v3, v4, :cond_115

    .line 109
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getUser()Lcom/brixd/niceapp/model/CommonUserModel;

    move-result-object v4

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " \u7b49"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getUpUsers()Ljava/util/ArrayList;

    move-result-object v4

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\u4eba\u7f8e\u8fc7"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 114
    :goto_ba
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->content:Landroid/widget/TextView;

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 115
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    const v4, 0x7f0201f3

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 116
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    new-instance v4, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$1;

    invoke-direct {v4, p0, v2}, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$1;-><init>(Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;Lcom/brixd/niceapp/userinfo/model/MessageModel;)V

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 160
    .end local v0    # "content":Ljava/lang/String;
    :goto_d1
    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getAppIcon()Ljava/lang/String;

    move-result-object v4

    iget-object v5, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->appIcon:Landroid/widget/ImageView;

    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v3, v4, v5, v6}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 161
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->appIcon:Landroid/widget/ImageView;

    new-instance v4, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$3;

    invoke-direct {v4, p0, v2}, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$3;-><init>(Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;Lcom/brixd/niceapp/userinfo/model/MessageModel;)V

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 185
    const-string v3, "operate_notify"

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getType()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1c6

    .line 186
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->appIcon:Landroid/widget/ImageView;

    const/16 v4, 0x8

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 187
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    invoke-virtual {v3, v7}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 192
    :goto_100
    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->isRead()Z

    move-result v3

    if-eqz v3, :cond_1ce

    .line 193
    const v3, 0x7f020210

    invoke-virtual {p2, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 198
    :goto_10c
    return-object p2

    .line 97
    .end local v1    # "holder":Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;
    .end local v2    # "message":Lcom/brixd/niceapp/userinfo/model/MessageModel;
    :cond_10d
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;

    .restart local v1    # "holder":Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;
    goto/16 :goto_4b

    .line 111
    .restart local v0    # "content":Ljava/lang/String;
    .restart local v2    # "message":Lcom/brixd/niceapp/userinfo/model/MessageModel;
    :cond_115
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getUser()Lcom/brixd/niceapp/model/CommonUserModel;

    move-result-object v4

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " \u7f8e\u8fc7"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_ba

    .line 129
    .end local v0    # "content":Ljava/lang/String;
    :cond_131
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    const-string v4, "#008ec3"

    invoke-static {v4}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V

    .line 131
    const-string v3, "daily_reply"

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getType()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_160

    const-string v3, "media_reply"

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getType()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_160

    const-string v3, "community_reply"

    .line 132
    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getType()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1b8

    :cond_160
    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    if-eqz v3, :cond_1b8

    .line 134
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getUser()Lcom/brixd/niceapp/model/CommonUserModel;

    move-result-object v5

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " @ "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/UserModel;->getNick()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 139
    :goto_18e
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->content:Landroid/widget/TextView;

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getContent()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 141
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    new-instance v4, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$2;

    invoke-direct {v4, p0, v2}, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$2;-><init>(Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;Lcom/brixd/niceapp/userinfo/model/MessageModel;)V

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 157
    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getUser()Lcom/brixd/niceapp/model/CommonUserModel;

    move-result-object v4

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/CommonUserModel;->getAvatarUrl()Ljava/lang/String;

    move-result-object v4

    iget-object v5, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v3, v4, v5, v6}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    goto/16 :goto_d1

    .line 136
    :cond_1b8
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    invoke-virtual {v2}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->getUser()Lcom/brixd/niceapp/model/CommonUserModel;

    move-result-object v4

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_18e

    .line 189
    :cond_1c6
    iget-object v3, v1, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter$ViewHolder;->appIcon:Landroid/widget/ImageView;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    goto/16 :goto_100

    .line 195
    :cond_1ce
    const v3, 0x7f020211

    invoke-virtual {p2, v3}, Landroid/view/View;->setBackgroundResource(I)V

    goto/16 :goto_10c
.end method

.method public setMessages(Ljava/util/List;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/userinfo/model/MessageModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 64
    .local p1, "mMessages":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/userinfo/model/MessageModel;>;"
    iput-object p1, p0, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->mMessages:Ljava/util/List;

    .line 65
    return-void
.end method
